home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 2: CDPD 1 / Almathera Ten on Ten - Disc 2: CDPD 1.iso / pd / 101-125 / 103 / sol / readme < prev    next >
Text File  |  1995-03-13  |  4KB  |  80 lines

  1.    This version is for the Amiga only. I stripped out all the stuff for
  2. the various Unix versions and put Amiga console control codes in place of
  3. the curses calls. I also fixed a bug in the solx auto mode. Both programs
  4. need an 80 column CLI window. To execute, just type the program name at
  5. the CLI prompt. I also wrote a shell script (sol.sh) to run solx in auto
  6. mode repeatedly and count the number of games until a win. I compiled 
  7. under Manx as follows:
  8.  
  9. cc sol.c -E200
  10. ln sol.o -lc 
  11.  
  12. An alias for Matt's shell in the file ccm.so can be used to compile 
  13. these programs. first 'source ccm.so', then use the command
  14. 'ccm sol' or 'ccm solx' to compile.
  15.  
  16.     Joel Swank 9/22/87
  17.  
  18.     Following are the readme files from the 2 previous authors:
  19.  
  20. ---------------------------------------------------------------------------
  21. I've done some work on "sol.c" to make it portable to more systems than
  22. just BSD.  The only thing that needs to be specified is whether System V
  23. terminfo/curses's termcap emulation is being used; compile with -DTERMINFO if
  24. so. (The Makefile has been modified for this.)  The other conditionals are
  25. based on SIGTSTP (independent of others; some System V's have job control) and
  26. on TCGETA from sys/ioctl.h. With no special compile #define's aside from the
  27. terminfo stuff, sol.c will make itself at home on your system.
  28.  
  29. I ripped the gettimeofday() calls out of both programs and used localtime()
  30. instead.  It does the job, since the returned value is used only to seed
  31. the random number generator, and it's portable.
  32.  
  33. I installed a bugfix in the termcap stuff while I was at it; the original
  34. author apparently didn't understand how the "bs" and "bc" attributes work.
  35. I've fixed that so it should work as per termcap(4).
  36.  
  37. Through the magic of "sdiff" and the fact that "sol" and "solx" are basically
  38. derived from the same original source code, I have made the same changes to
  39. "solx".  Again, they work here.
  40.  
  41. I haven't tested this under BSD (I don't have a BSD system available to me)
  42. so I may have broken something under BSD.  The game does successfully auto-
  43. configure for System III and System V, and works fine.  (It also uses termio
  44. on these systems, so "echoe" gets reset properly.) Presumably it will work
  45. properly under Xenix 3 and Xenix 5, but I can't test it.
  46.  
  47. Have fun with "sol" and "solx".
  48.  
  49. ++Brandon
  50.  
  51. (author's original README included below)
  52. ===============================================================================
  53.  
  54. Sources for two solitaire games - a while back someone posted some sources
  55. in some language or other that played solitaire. With about two evenings
  56. woth of work that became sol.c - standard solitaire. To compile either game
  57. (under BSD4.3) use a command like 'cc -o sol sol.c -ltermcap' or
  58. 'cc -o solx solx.c -ltermcap' - you'll have to adjust on Xenix for termcap
  59. etc. etc. etc. solx.c is a different solitaire game, and a lot more
  60. difficult to get out. You start with 1 run containing a single card
  61. (#1 in the game), then hidden piles 2 thru 7, containing 2 thru 7 cards
  62. respectively. The remaining 24 cards are dealt on runs 2 thru 7 - four
  63. in each run. There is no deck - all you can do is to move runs around.
  64. Unlike regular solitaire, runs can be split, hence the altered move
  65. command, and since runs can get a bit long (I've seen them as big as
  66. 22-23 cards) I've turned the display on it's side. Both games have several
  67. cheats, and an autopilot, although the autopilot for solx is not very clever.
  68. In order to prevent thrashing of runs I coded it so that it will only move
  69. a run if the top card being moved was not already placed. However there
  70. are times when such an apparently redundant move is necessary to get out.
  71.  
  72. Best of luck, and have fun.
  73. --
  74.         dg@wrs.UUCP - David Goodenough
  75.  
  76.                     +---+
  77.                     | +-+-+
  78.                     +-+-+ |
  79.                       +---+
  80.